#pragma once 

//#include <glm/glm.hpp>

#include "Math/Vec3.h"
#include "Math/Vec2.h"

#include "Containers/Vector.h"

#include "Vertex.h"

#include "VertexGroup.m.h"

//a vertex group always cooresponding a material
RSTRUCT()
struct SVertexGroup
{
    ROBJECT

    SVertexGroup()
    {

    }

    SVertexGroup(const TVector<SVertex>& InVertice, const TVector<uint32_t>& InIndices)
        :Vertice(InVertice)
        ,Indices(InIndices)
    {

    }
    RFIELD(SerializeAsBinary)
    TVector<SVertex> Vertice;

    //might be empty
    RFIELD(SerializeAsBinary)
    TVector<uint32_t> Indices;

    size_t GetVertexDataSize()
    {
        return sizeof(SVertex)*GetVertexNum();
    }

    size_t GetVertexNum()
    {
        return Vertice.Num();
    }
};